<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Currency_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
	
	function currency_by_site($siteid){
		$sql = "select * from sdk_currency where siteid= ? ";
		$q = $this->db->query($sql, array('siteid'=>$siteid));
		
		return $q->result();
	}
	
	function update_currency($config, $siteid){		

			$sql = $this->db->update_string("sdk_currency", array('set_currency'=>serialize($config)), 'siteid=' . $siteid);
			$this->db->query($sql);
		
	}
}
?>